package com.ftg.learn.chapter08.pattern.singleton;

/**
 * DCL
 *
 * @author lijiaxin
 * @version 1.0
 * @date 2023/8/3 8:51
 */

public class  MyDCL {

    private MyDCL(){}
    private static volatile MyDCL dcl;

    public static MyDCL getInstance(){
        if(null==dcl){
            synchronized (MyDCL.class){
                if(null==dcl){
                    dcl=new MyDCL();
                }
            }
        }
        return  dcl;
    }

}
